package com.chif.goingplus.service;

import com.chif.goingplus.websocket.WebSocket;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class ScoketServiceImpl implements ScoketService {


    @Autowired
    WebSocket webSocket;

    @Override
    @Async
    public void sendAllMessage(String  json) {
        webSocket.sendAllMessage("服务层测试成功！"+json);
        System.out.println("异步发送成功");
    }
}
